<?php 

/**
*Form Builder & Admin Generator

*@author marcio <opi14@op.pl>, <polishvodka7@gmail.com>
*@copyright Copyright (c) 2011, marcio
*@version 1.6.5
*/


abstract class Volta_View_Panel
{

	protected $config = array();
	
	protected $columns = array();
	
	protected $records = array();
	
	protected $message;
	

	public function configure($cfg)
	{
		$this -> config = $cfg;
	}
	
	
	public function set_columns($columns, $allowed)
	{
		$this -> columns['cols'] = $columns;
		$this -> columns['allowed'] = $allowed;
	}

	
	public function set_records($records)
	{
		$this -> records = $records;
	}
	
	
	public function set_message($msg)
	{
		$this -> message = $msg;
	}
	
	
	public function get($key)
	{
		if(array_key_exists($key, $this -> config))
			return $this -> config[$key];
	}
	
	
	public function get_columns($type)
	{
		if(array_key_exists($type, $this -> columns))
			return $this -> columns[$type];
		return $this -> columns;
	}
	
	
	public function get_records()
	{
		return $this -> records;
	}
	
	
	public function get_message()
	{
		return $this -> message;
	}
	
	
	abstract public function render();
	
}
?>